T-SQL Using Parameter Table like a Cursor
Searching Google about Cursors in t-SQl might get this result https://jackdonnell.com/articles/SQL_CURSOR.htm. Here is an alternative
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed